All Questions
7 questions
3votes
0answers
98views
Comparing two Tree sort algorithm variations implemented in Java
I have this repository. It contains three variations of a simple sorting algorithm for integer keys. The idea is that we keep a balanced BST in which each node holds the integer key and its frequency. ...
1vote
0answers
1kviews
Median of three partitioning taking more time than standard quicksort in java
I implemented a standard quicksort and I have a project where I need to improve it. I am trying to make quicksort faster by implementing median of 3 partitioning. I copied codes from trusted ...
3votes
2answers
177views
Evaluation of a variation of quick-sort (pivot-selection)
Here is a variation of quick-sort where-in the pivot selection is based on calculating the average of the values of the highest and lowest numbers. ...
3votes
3answers
221views
String comparator as a lambda
I am writing a Comparator for my TreeMap. It looks like this: ...
1vote
1answer
152views
Sort by year and day descending, yet time ascending
I recently discovered a hugely inefficient portion of code in my program, and have gone about rewriting it. I am however, not quite sure if the rewritten program actually does exactly what I want, due ...
2votes
4answers
139views
Java sort by selection: which is better in regards to readability and efficiency?
Which algorithm do you think is better in regards to readability and efficiency? selection(): ...
8votes
5answers
31kviews
Checking if an array is sorted
I've come up with two ways to check to see if array is sorted and return true if it is. ...